package com.zuoshengli.intercept;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description TODO
 * @Author zuoshengli
 **/
@Configuration
public class WebIntercept implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(getSpringMVCIntercept());
    }

    @Bean
    public SpringMVCIntercept getSpringMVCIntercept() {
        return new SpringMVCIntercept();
    }
}